<?php 
require_once("dbconnect.php");

$startDate=$_GET['stDate'];
$endDate=$_GET['endDate'];
$exeName=$_GET['exeName'];
//echo $exeName;
$qr="select * from executives where exe_name='$exeName';";
$res=mysql_query($qr) or die(mysql_error());
while($rw=mysql_fetch_assoc($res))
	{
	$id=$rw['id'];
	//echo $id;

$sql="select * from daily_activity where exe_id='$id' and edate between '$startDate' and '$endDate'";
$result=mysql_query($sql) or die(mysql_error());
while($row=mysql_fetch_assoc($result))
	{
	 $timein=$row['timein'];
	$timeout=$row['timeout']; 
	$org=$row['organisation'];
	$industryType=$row['industry_type'];
	$elp=$row['elp'];
	$contperson=$row['cont_person'];
	$disgnation=$row['disgnation'];
	$tel=$row['telephone'];
	$visitObj=$row['visit_objective'];
	$visitOut=$row['visit_outcome'];
	$nextstep=$row['nextstep'];
	$kms=$row['kms'];
	$remarks=$row['remarks'];
	$edate=$row['edate'];
	//echo "date is ".$edate."\n";
	
	echo $id."/".$timein."/".$timeout."/".$org."/".$industryType."/".$elp."/".$contperson."/".$disgnation."/".$tel."/".$visitObj."/".$visitOut."/";
	echo $nextstep."/".$kms."/".$remarks."/".$edate."@";
	}
	}
?>